﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Frame.Lib.Common;
using Frame.Lib.Utilities;



namespace Frame.Web.Common.Master
{
    public partial class FrameMain : MasterPage
    {
        protected string strAppPath;

        protected void Page_Init(object sender, EventArgs e)
        {
            strAppPath = GlobalVar.WebAppPath;
            js.Text = "<script type='text/javascript' src='" + GlobalVar.WebAppPath + "Common/js/jquery/jquery-1.5.2.min.js' ></script>" +
                      "<script type='text/javascript' src='" + GlobalVar.WebAppPath + "Common/js/common.js' ></script>";


            // 把GridView的ID存到客户端
            WebControl gvList = (WebControl)this.ContentPlaceHolder1.FindControl("gvList");
            string strID = "lvList";
            if (gvList != null)
            {
                strID = gvList.ClientID;
            }

            this.Page.ClientScript.RegisterHiddenField("hidGvID", strID);
           
            //
            WebControl btnRefresh = (WebControl)this.ContentPlaceHolder1.FindControl("btnRefresh");
            if (btnRefresh != null)
            {
                string strScript = "SetRefreshBtn('" + btnRefresh.ClientID + "');";
                JSUtil.ExcuteJS(strScript, "setbtn");
            }
            
        }
    }
}
